//
// Created by dong on 2025/10/21.
//

#ifndef BASEC_SACTIONTWO_H
#define BASEC_SACTIONTWO_H

#include "demo101.h"

class SActionTwo
{
public:
    SActionTwo(const string& str);
    string text()const;
    template<typename pr,typename ...Args>
    void connect(pr&& f,Args&& ...args)
    {
        func = bind(forward<pr>(f),forward<Args>(args)...);
    }

    void pressEvent(SDL_Event* msg);

    void setColor(const SDL_Color& color);
    SDL_Color getColor();
protected:
    string m_text;
    SDL_Rect dst;
    SDL_Color color;
    function<void()> func;

};


#endif //BASEC_SACTIONTWO_H